package reflect;

public class ReflectDemo9 {
    public static void main(String[] args) throws Exception {
        //查看Person类是否被注解@AutoRunClass标注
        //1.获取Person类对象
        Class cls = Class.forName("reflect.Person");
        //2.通过类对象查看是否别指定的注解标注
        boolean mark = cls.isAnnotationPresent(AutoRunClass.class);
        if (mark){
            System.out.println("被标注了");
        }else {
            System.out.println("没有被标注");
        }
    }

}
